cmake_minimum_required(VERSION 2.8)
file(GLOB EXAMPLE_SRC "*.c")

if(NOT DEFINED ENV{NEUWARE_HOME})
    message("NEUWARE_HOME is not defined. Default path is \"/usr/local/neuware/\".")
    set(ENV{NEUWARE_HOME} /usr/local/neuware)
    include_directories("$ENV{NEUWARE_HOME}/include")
    link_directories("$ENV{NEUWARE_HOME}/lib64")
    unset(ENV{NEUWARE_HOME} )
else()
    include_directories("$ENV{NEUWARE_HOME}/include")
    link_directories("$ENV{NEUWARE_HOME}/lib64")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
add_executable(devicequery devicequery.c)
target_link_libraries(devicequery cndev)

